/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package sms4j.notification;

import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
import org.smslib.AGateway;
import org.smslib.IOrphanedMessageNotification;
import org.smslib.InboundMessage;

/**
 *
 * @author Swang
 */
public class OrphanedMessageNotification implements IOrphanedMessageNotification {

    private static final Log log = LogFactory.getLog(OrphanedMessageNotification.class);

    @Override
    public boolean process(AGateway gateway, InboundMessage msg) {
        log.info(">>> Orphaned message part detected from " + gateway.getGatewayId());
        log.info(msg);
        // Since we are just testing, return FALSE and keep the orphaned message part.
        return false;
    }
}
